home *** CD-ROM | disk | FTP | other *** search
- Path: news.compulink.gr!athena!lonewolf
- From: lonewolf@athena.compulink.gr (Costas Vlassis)
- Newsgroups: comp.lang.c
- Subject: Small problem with C...
- Date: 13 Apr 1996 11:45:19 GMT
- Organization: CompuLink Network S.A.
- Message-ID: <4ko44f$jf2@venus.compulink.gr>
- NNTP-Posting-Host: 193.92.197.99
- X-Newsreader: TIN [version 1.2 PL2]
-
- Well I am taking my first steps with C on my Linux box with GCC
- 2.7.0...
-
- What I want to do is this :
-
- Make a matrix, 50 x 50 x 8, fill this matrix with random numbers with the
- following limitations :
-
- - All the matrix elements must be positive integers.
-
- - The elements [x][y][1], [x][y][3], [x][y][5], must be over 10 and lower
- than 80.
-
- - The sum of the elements ([x][y][1] + [x][y][3] + [x][y][5]) must not
- exceed 100 for every x,y.
-
- - The elements [x][y][2], [x][y][4], [x][y][6] must be from 1-5 for every
- x,y.
-
- - The elements [x][y][7] must be from 1-9 for every x,y
-
- - The elements [x][y][8] must be 0 for every x,y
-
- Maybe it is easy, maybe not... well If someone can contribute the
- code it would be of big help...!!!
-
- Thanks in adnvance,
- Costas Vlassis
- lonewolf@compulink.gr
-
-